Systems and methods for fault tolerant communications

ABSTRACT

Apparatuses, systems and methods are disclosed for tolerating fault in a communications grid. Specifically, various techniques and systems are provided for detecting a fault or failure by a node in a network of computer nodes in a communications grid, adjusting the grid to avoid grid failure, and taking action based on the failure. In an example, a system may include receiving grid status information at a backup control node, the grid status information including a project status, storing the grid status information within the backup control node, receiving a failure communication including an indication that a primary control node has failed, designating the backup control node as a new primary control node, receiving updated grid status information based on the indication that the primary control node has failed, and transmitting a set of instructions based on the updated grid status information.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a non-provisional of and claims the benefit and priority under35 U.S.C. §119(e) of U.S. Provisional App. No. 62/019,426, titled“Fault-Tolerant Communication Strategies for Distributed Processing.”That U.S. Provisional Application was filed on Jul. 1, 2014, and isincorporated by reference herein for all purposes.

FIELD

The present disclosure relates to a computer technology for toleratingfault in a communications grid. Specifically, various techniques andsystems are provided for detecting a fault or failure by a node in anetwork of computer nodes in a communications grid, adjusting the gridto avoid grid failure, and taking action based on the failure.

BACKGROUND

In a communications grid that includes a network of computer nodesexecuting a job, a node may fail. A failure of a node may cause afailure of the entire grid, and therefore a failure of the entire job,causing the job to be restarted from the beginning. For a job thatincludes a large data set or that may take a long period of time tocomplete, such a failure may be especially problematic.

BRIEF SUMMARY

The present disclosure relates to a computer technology for toleratingfault in a communications grid. Specifically, various techniques andsystems are provided for detecting a fault or failure by a node in anetwork of computer nodes in a communications grid, adjusting the gridto avoid grid failure, and taking action based on the failure. In anembodiment, a computer-program product may be tangibly embodied in anon-transitory machine-readable storage medium. The non-transitorymachine-readable storage medium may include instructions configured tocause a data processing apparatus to receive, at a backup control nodeconnected to a primary control node and a worker node on acommunications grid, grid status information, the grid statusinformation including a project status of the primary control node or aproject status of the worker node, wherein the project status of theprimary control node and the project status of the worker node include astatus of one or more portions of a project being executed by theprimary and worker nodes in the communications grid, store the gridstatus information within the backup control node, receive a failurecommunication including an indication that the primary control node hasfailed, designate the backup control node as a new primary control nodebased on the failure communication upon receiving the failurecommunication, receive updated grid status information based on theindication that the primary control node has failed, wherein the updatedgrid status information includes an updated project status of theprimary control node or an updated project status of the worker node,and transmit a set of instructions based on the updated grid statusinformation, wherein the set of instructions includes instructions forthe worker nodes to continue work on the project after failure of theprimary control node.

In an aspect, the computer-program product may further compriseinstructions configured to cause the data processing apparatus toreceive, at the backup control node, a primary node communicationincluding an indication that the backup control node is the new primarycontrol node. In another aspect, upon receiving the failurecommunication, the backup control node determines whether the backupnode should be designated as the new primary control node based on aunique identifier or rank of the backup control node, and assigning anew primary control node. In another aspect, upon receiving the failurecommunication, the backup control node determines that the backupcontrol node is the only backup control node on the communications grid.In another aspect, the primary control node controls the portions of theproject that each worker node is responsible for executing. In anotheraspect, each control node and worker node on the communications grid isassigned a unique identifier stored, wherein the unique identifiers ofthe nodes indicate a hierarchy of the nodes within the communicationsgrid, and wherein each control node and each worker node store theunique identifier for every other control node and worker node on thecommunications grid. In another aspect, worker nodes of the worker nodeexecutes different portions of the project. In another aspect, the gridstatus information includes a project checkpoint (or progresscheckpoint) that indicates a stage of progress of the project prior tofailure of the primary control node. In another aspect, transmitting theset of instructions based on the updated grid status informationincludes transmitting a status from the project checkpoint thatindicates the stage of progress of the project prior to the failure ofthe primary control node. In another aspect, the computer-programproduct may further comprise instructions configured to cause the dataprocessing apparatus to determine that the primary control node hasfailed, wherein determining that the primary control node has failedincludes determining that the backup control node did not receive anexpected heartbeat communication, wherein the heartbeat communicationindicates that the primary control node is operative. In another aspect,determining that the primary control node has failed includesdetermining that the backup control node did not receive a heartbeatcommunication from the primary control node after a predetermined periodof time.

In another embodiment, a computing device may comprise one or moreprocessors, and a memory having instructions stored thereon, which whenexecuted by the one or more processors. The processor may cause thecomputing device to perform operations including receiving, at a backupcontrol node connected to a primary control node and a worker node on acommunications grid, grid status information, the grid statusinformation including a project status of the primary control node or aproject status of the worker node, wherein the project status of theprimary control node and the project status of the worker node include astatus of one or more portions of a project being executed by theprimary and worker nodes in the communications grid, storing the gridstatus information within the backup control node, receiving a failurecommunication including an indication that the primary control node hasfailed, designating the backup control node as a new primary controlnode based on the failure communication upon receiving the failurecommunication, receiving updated grid status information based on theindication that the primary control node has failed, wherein the updatedgrid status information includes an updated project status of theprimary control node or an updated project status of the worker node,and transmitting a set of instructions based on the updated grid statusinformation, wherein the set of instructions includes instructions forthe worker nodes to continue work on the project after failure of theprimary control node.

In an aspect, the computing device may further comprise instructions,which when executed by the one or more processors, cause the computingdevice to perform operations including receiving, at the backup controlnode, a primary node communication including an indication that thebackup control node is the new primary control node. In another aspect,upon receiving the failure communication, the backup control nodedetermines whether the backup node should be designated as the newprimary control node based on a unique identifier or rank of the backupcontrol node, and assigning a new primary control node. In anotheraspect, upon receiving the failure communication, the backup controlnode determines that the backup control node is the only backup controlnode on the communications grid. In another aspect, the primary controlnode controls the portions of the project that each worker node isresponsible for executing. In another aspect, each control node andworker node on the communications grid is assigned a unique identifierstored, wherein the unique identifiers of the nodes indicate a hierarchyof the nodes within the communications grid, and wherein each controlnode and each worker node store the unique identifier for every othercontrol node and worker node on the communications grid. In anotheraspect, worker nodes of the worker node executes different portions ofthe project. In another aspect, the grid status information includes aproject checkpoint that indicates a stage of progress of the projectprior to failure of the primary control node. In another aspect,transmitting the set of instructions based on the updated grid statusinformation includes transmitting a status from the project checkpointthat indicates the stage of progress of the project prior to the failureof the primary control node. In another aspect, the computing device mayfurther comprise instructions, which when executed by the one or moreprocessors, cause the computing device to perform operations including,determining that the primary control node has failed, whereindetermining that the primary control node has failed includesdetermining that the backup control node did not receive an expectedheartbeat communication, wherein the heartbeat communication indicatesthat the primary control node is operative. In another aspect,determining that the primary control node has failed includesdetermining that the backup control node did not receive a heartbeatcommunication from the primary control node after a predetermined periodof time.

In another embodiment, a computer-implemented method may comprisereceiving, at a backup control node connected to a primary control nodeand a worker node on a communications grid, grid status information, thegrid status information including a project status of the primarycontrol node or a project status of the worker node, wherein the projectstatus of the primary control node and the project status of the workernode include a status of one or more portions of a project beingexecuted by the primary and worker nodes in the communications grid,storing the grid status information within the backup control node,receiving a failure communication including an indication that theprimary control node has failed, designating the backup control node asa new primary control node based on the failure communication uponreceiving the failure communication, receiving updated grid statusinformation based on the indication that the primary control node hasfailed, wherein the updated grid status information includes an updatedproject status of the primary control node or an updated project statusof the worker node, and transmitting a set of instructions based on theupdated grid status information, wherein the set of instructionsincludes instructions for the worker nodes to continue work on theproject after failure of the primary control node.

In an aspect, the method may further comprise receiving, at the backupcontrol node, a primary node communication including an indication thatthe backup control node is the new primary control node. In anotheraspect, upon receiving the failure communication, the backup controlnode determines whether the backup node should be designated as the newprimary control node based on a unique identifier or rank of the backupcontrol node, and assigning a new primary control node. In anotheraspect, upon receiving the failure communication, the backup controlnode determines that the backup control node is the only backup controlnode on the communications grid. In another aspect, the primary controlnode controls the portions of the project that each worker node isresponsible for executing. In another aspect, each control node andworker node on the communications grid is assigned a unique identifierstored, wherein the unique identifiers of the nodes indicate a hierarchyof the nodes within the communications grid, and wherein each controlnode and each worker node store the unique identifier for every othercontrol node and worker node on the communications grid. In anotheraspect, worker nodes of the worker node executes different portions ofthe project. In another aspect, the grid status information includes aproject checkpoint that indicates a stage of progress of the projectprior to failure of the primary control node. In another aspect,transmitting the set of instructions based on the updated grid statusinformation includes transmitting a status from the project checkpointthat indicates the stage of progress of the project prior to the failureof the primary control node. In another aspect, the method may furthercomprise determining that the primary control node has failed, whereindetermining that the primary control node has failed includesdetermining that the backup control node did not receive an expectedheartbeat communication, wherein the heartbeat communication indicatesthat the primary control node is operative. In another aspect,determining that the primary control node has failed includesdetermining that the backup control node did not receive a heartbeatcommunication from the primary control node after a predetermined periodof time.

In another embodiment, a computer-program product may be tangiblyembodied in a non-transitory machine-readable storage medium. Thenon-transitory machine-readable storage medium may include instructionsconfigured to cause a data processing apparatus to transmit, from aprimary control node connected to one or more worker nodes on acommunications grid, worker instructions related to a project beingexecuted by the one or more worker nodes, generate a snapshot of thecommunications grid, wherein the snapshot of the communications gridincludes a project status of each of the one or more worker nodes,wherein a project status of a worker node includes a status of a portionof the project being executed by the worker node in the communicationsgrid, determine that a failed worker node of the one or more workernodes has failed, wherein the one or more worker nodes has failed at afailure time, identify a project status of the failed worker node usingthe snapshot of the communications grid, wherein the project status ofthe failed worker node includes a status of a portion of the projectbeing executed by the failed worker node at the failure time, andtransmit updated worker instructions, wherein the updated workerinstructions include the project status of the failed worker node andupdated instructions related to the project being executed by the one ormore worker nodes, wherein the updated worker instructions facilitateexecution of the portion of the project being executed by the failedworker node.

In an aspect, the computer-program product may further compriseinstructions configured to cause the data processing apparatus toidentify a functioning worker node of the one or more worker nodes tocomplete the portion of the project being executed by the failed workernode. In another aspect, each worker node on the communications grid isassigned a unique identifier, wherein the unique identifiers of theworker nodes indicate a hierarchy of the worker nodes associated witheach unique identifier within the communications grid. In anotheraspect, the updated worker instructions facilitate a functioning workernode of the one or more worker nodes beginning execution of the portionof the project being executed by the failed worker node. In anotheraspect, the computer-program product may further comprise instructionsconfigured to cause the data processing apparatus to determine that thefailed worker node is the only worker node on the communications grid,and add a new worker node to the communications grid. In another aspect,the primary control node manages distribution of portions of the projectthat each worker node is responsible for executing. In another aspect,determining that a failed worker node of the one or more worker nodeshas failed includes determining that the primary control node did notreceive an heartbeat communication subsequent to transmitting the workerinstructions related to the project being executed by the one or moreworker nodes.

In another embodiment, a computing device may comprise one or moreprocessors, and a memory having instructions stored thereon, which whenexecuted by the one or more processors. The processor may cause thecomputing device to perform operations including transmitting, from aprimary control node connected to one or more worker nodes on acommunications grid, worker instructions related to a project beingexecuted by the one or more worker nodes, generating a snapshot of thecommunications grid, wherein the snapshot of the communications gridincludes a project status of each of the one or more worker nodes,wherein a project status of a worker node includes a status of a portionof the project being executed by the worker node in the communicationsgrid, determining that a failed worker node of the one or more workernodes has failed, wherein the one or more worker nodes has failed at afailure time, identifying a project status of the failed worker nodeusing the snapshot of the communications grid, wherein the projectstatus of the failed worker node includes a status of a portion of theproject being executed by the failed worker node at the failure time,and transmitting updated worker instructions, wherein the updated workerinstructions include the project status of the failed worker node andupdated instructions related to the project being executed by the one ormore worker nodes, wherein the updated worker instructions facilitateexecution of the portion of the project being executed by the failedworker node.

In an aspect, the computing device may further comprise instructions,which when executed by the one or more processors, cause the computingdevice to perform operations including identifying a functioning workernode of the one or more worker nodes to complete the portion of theproject being executed by the failed worker node. In another aspect,each worker node on the communications grid is assigned a uniqueidentifier, wherein the unique identifiers of the worker nodes indicatea hierarchy of the worker nodes associated with each unique identifierwithin the communications grid. In another aspect, the updated workerinstructions facilitate a functioning worker node of the one or moreworker nodes beginning execution of the portion of the project beingexecuted by the failed worker node. In another aspect, the computingdevice may further comprise instructions, which when executed by the oneor more processors, cause the computing device to perform operationsincluding determining that the failed worker node is the only workernode on the communications grid, and add a new worker node to thecommunications grid. In another aspect, the primary control node managesdistribution of portions of the project that each worker node isresponsible for executing. In another aspect, determining that a failedworker node of the one or more worker nodes has failed includesdetermining that the primary control node did not receive an heartbeatcommunication subsequent to transmitting the worker instructions relatedto the project being executed by the one or more worker nodes.

In another embodiment, a computer-implemented method may comprisetransmitting, from a primary control node connected to one or moreworker nodes on a communications grid, worker instructions related to aproject being executed by the one or more worker nodes, generating asnapshot of the communications grid, wherein the snapshot of thecommunications grid includes a project status of each of the one or moreworker nodes, wherein a project status of a worker node includes astatus of a portion of the project being executed by the worker node inthe communications grid, determining that a failed worker node of theone or more worker nodes has failed, wherein the one or more workernodes has failed at a failure time, identifying a project status of thefailed worker node using the snapshot of the communications grid,wherein the project status of the failed worker node includes a statusof a portion of the project being executed by the failed worker node atthe failure time, and transmitting updated worker instructions, whereinthe updated worker instructions include the project status of the failedworker node and updated instructions related to the project beingexecuted by the one or more worker nodes, wherein the updated workerinstructions facilitate execution of the portion of the project beingexecuted by the failed worker node.

In an aspect, the method may further comprise identifying a functioningworker node of the one or more worker nodes to complete the portion ofthe project being executed by the failed worker node. In another aspect,each worker node on the communications grid is assigned a uniqueidentifier, wherein the unique identifiers of the worker nodes indicatea hierarchy of the worker nodes associated with each unique identifierwithin the communications grid. In another aspect, the updated workerinstructions facilitate a functioning worker node of the one or moreworker nodes beginning execution of the portion of the project beingexecuted by the failed worker node. In another aspect, the method mayfurther comprise determining that the failed worker node is the onlyworker node on the communications grid, and add a new worker node to thecommunications grid. In another aspect, the primary control node managesdistribution of portions of the project that each worker node isresponsible for executing. In another aspect, determining that a failedworker node of the one or more worker nodes has failed includesdetermining that the primary control node did not receive an heartbeatcommunication subsequent to transmitting the worker instructions relatedto the project being executed by the one or more worker nodes.

This summary is not intended to identify key or essential features ofthe claimed subject matter, nor is it intended to be used in isolationto determine the scope of the claimed subject matter. The subject mattershould be understood by reference to appropriate portions of the entirespecification of this patent, any or all drawings, and each claim.

The foregoing, together with other features and embodiments, will becomemore apparent upon referring to the following specification, claims, andaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example of a block diagram bus that provides ageneralized illustration of hardware and software components of acommunications grid, according to embodiments of the present technology.

FIG. 2 illustrates an example of a communications grid including acontrol node and one or more worker nodes, according to embodiments ofthe present technology.

FIG. 3 illustrates an example of a communications grid including twocontrol nodes and one or more worker nodes, according to embodiments ofthe present technology.

FIG. 4 illustrates an example of a communications grid including threecontrol nodes and one or more worker nodes, according to embodiments ofthe present technology.

FIG. 5 illustrates an example of a communications grid including twocontrol nodes, including a backup control node with a stored gridsnapshot, and one or more worker nodes, according to embodiments of thepresent technology.

FIG. 6 illustrates an example of a communications grid including twocontrol nodes, including a backup control node with a stored gridsnapshot, and one or more worker nodes, according to embodiments of thepresent technology.

FIG. 7 illustrates an example of a communications grid including twocontrol nodes, including a backup control node with a stored gridsnapshot, and one or more worker nodes, according to embodiments of thepresent technology.

FIG. 8 illustrates an example of a communications grid including a newprimary control node and former backup control node, and one or moreworker nodes, according to embodiments of the present technology.

FIG. 9 illustrates an example of a communications grid including aprimary control node and one or more worker nodes, according toembodiments of the present technology.

FIG. 10 illustrates an example of a communications grid including acontrol node and one or more worker nodes, according to embodiments ofthe present technology.

FIG. 11 illustrates an example of a communications grid including acontrol node and one or more worker nodes, according to embodiments ofthe present technology.

FIG. 12 illustrates an example of a communications grid including acontrol node and one or more worker nodes, according to embodiments ofthe present technology.

FIG. 13 is a flow chart showing an example process for recovering from aprimary control node failure in a communications grid, according toembodiments of the present technology.

FIG. 14 is a flow chart showing an example process for recovering from aworker node failure in a communications grid after a failure of a workernode, according to embodiments of the present technology.

FIG. 15 is a flow chart showing an example process for recovering from acontrol node failure in a communications grid, according to embodimentsof the present technology.

FIG. 16 is a flow chart showing an example process for authenticating aconnection between nodes from the perspective of a grid server,according to embodiments of the present technology.

FIG. 17 is a flow chart showing an example process for authenticating aconnection between nodes from the perspective of a grid client,according to embodiments of the present technology.

FIG. 18 is a flow chart showing an example process to assign a list ofnodes, numbered m through n, as children to a node, such as a controlnode, according to embodiments of the present technology.

FIG. 19 is a flow chart showing an example process for a primary controlnode to distribute work for a client project between the other nodes ina communications grid, according to embodiments of the presenttechnology.

FIG. 20 is a flow chart showing an example process for a backup controlnode to receive and store updated status information in a communicationsgrid, according to embodiments of the present technology.

FIG. 21 is a flow chart showing an example method for a worker node toprocess a job during a communications grid computation, according toembodiments of the present technology.

FIG. 22 is a flow chart showing an example process for broadcasting datawithin a communications grid, according to embodiments of the presenttechnology.

FIG. 23 is a flow chart showing an example process for reduction withina communications grid, according to embodiments of the presenttechnology.

DETAILED DESCRIPTION

In the following description, for the purposes of explanation, specificdetails are set forth in order to provide a thorough understanding ofembodiments of the technology. However, it will be apparent that variousembodiments may be practiced without these specific details. The figuresand description are not intended to be restrictive.

The ensuing description provides example embodiments only, and is notintended to limit the scope, applicability, or configuration of thedisclosure. Rather, the ensuing description of the example embodimentswill provide those skilled in the art with an enabling description forimplementing an example embodiment. It should be understood that variouschanges may be made in the function and arrangement of elements withoutdeparting from the spirit and scope of the technology as set forth inthe appended claims.

Specific details are given in the following description to provide athorough understanding of the embodiments. However, it will beunderstood by one of ordinary skill in the art that the embodiments maybe practiced without these specific details. For example, circuits,systems, networks, processes, and other components may be shown ascomponents in block diagram form in order not to obscure the embodimentsin unnecessary detail. In other instances, well-known circuits,processes, algorithms, structures, and techniques may be shown withoutunnecessary detail in order to avoid obscuring the embodiments.

Also, it is noted that individual embodiments may be described as aprocess which is depicted as a flowchart, a flow diagram, a data flowdiagram, a structure diagram, or a block diagram. Although a flowchartmay describe the operations as a sequential process, many of theoperations can be performed in parallel or concurrently. In addition,the order of the operations may be re-arranged. A process is terminatedwhen its operations are completed, but could have additional steps notincluded in a figure. A process may correspond to a method, a function,a procedure, a subroutine, a subprogram, etc. When a process correspondsto a function, its termination can correspond to a return of thefunction to the calling function or the main function.

The term “machine-readable storage medium” or “computer-readable storagemedium” includes, but is not limited to, portable or non-portablestorage devices, optical storage devices, and various other mediumscapable of storing, containing, or carrying instruction(s) and/or data.A machine-readable medium may include a non-transitory medium in whichdata can be stored. Examples of a non-transitory medium may include, butare not limited to, a magnetic disk or tape, optical storage media suchas compact disk (CD) or digital versatile disk (DVD), flash memory,memory or memory devices. A computer-program product may include codeand/or machine-executable instructions that may represent a procedure, afunction, a subprogram, a program, a routine, a subroutine, a module, asoftware package, a class, or any combination of instructions, datastructures, or program statements. A code segment may be coupled toanother code segment or a hardware circuit by passing and/or receivinginformation, data, arguments, parameters, or memory contents.Information, arguments, parameters, data, etc. may be passed, forwarded,or transmitted via any suitable means including memory sharing, messagepassing, token passing, network transmission, etc.

Furthermore, embodiments may be implemented by hardware, software,firmware, middleware, microcode, hardware description languages, or anycombination thereof. When implemented in software, firmware, middlewareor microcode, the program code or code segments to perform the necessarytasks (e.g., a computer-program product) may be stored in amachine-readable medium. A processor(s) may perform the necessary tasks.

Systems depicted in some of the figures may be provided in variousconfigurations. In some embodiments, the systems may be configured as adistributed system where one or more components of the system aredistributed across one or more networks in a cloud computing system.

FIG. 1 shows a block diagram of example hardware for a stand-alonecomputer architecture 100, which may be used to contain and/or implementthe program instructions of system embodiments of the presentdisclosure. More specifically, architecture 100 may be included within anode of a communications grid, as described further herein with respectto FIGS. 2-23. A bus 152 may serve as the information highwayinterconnecting the other illustrated components of the hardware. Aprocessing system 154 labeled CPU (central processing unit) (e.g., oneor more computer processors), may perform calculations and logicoperations required to execute a program. A processor-readable storagemedium, such as read only memory (ROM) 156 and random access memory(RAM) 158, may be in communication with the processing system 154 andmay contain one or more programming instructions. Optionally, programinstructions may be stored on a computer readable storage medium such asa magnetic disk, optical disk, recordable memory device, flash memory,or other physical storage medium. Computer instructions may also becommunicated via a communications transmission, data stream, or amodulated carrier wave.

A disk controller 160 interfaces one or more optional disk drives to thesystem bus 152. These disk drives may be external or internal floppydisk drives such as 162, external or internal CD-ROM, CD-R, CD-RW or DVDdrives such as 164, or external or internal hard drives 166. Asindicated previously, these various disk drives and disk controllers areoptional devices.

Each of the element managers, real-time data buffer, conveyors, fileinput processor, database index shared access memory loader, referencedata buffer and data managers may include a software application storedin one or more of the disk drives connected to the disk controller 160,the ROM 156 and/or the RAM 158. The processing system 154 may accesseach component as required.

A display interface 168 may permit information from the bus 156 to bedisplayed on a display 170 in audio, graphic, or alphanumeric format.Communication with external devices may optionally occur using variouscommunication ports 178.

In addition to the standard computer-type components, the hardware mayalso include data input devices, such as a keyboard 172, or other inputdevice 174, such as a microphone, remote control, touchpad, keypad,stylus, motion and/or gesture sensor, location sensor, still and/orvideo camera, pointer, mouse and/or joystick.

The present disclosure relates to a computer technology for toleratingfault in a communications grid. Specifically, various techniques andsystems are provided for detecting a fault or failure by a node in anetwork of computer nodes in a communications grid, adjusting the gridto avoid grid failure, and taking action based on the failure. Morespecifically, embodiments of the methods and systems described hereininclude identifying or detecting a failure of a primary control node ina communications grid, and using grid status or checkpoint informationto allow a backup node to take over as primary control node. The newprimary control node may then control the worker nodes connected to itto complete the project being performed by the grid. Alternativeembodiments include identifying or detecting a failure of a worker nodein a communications grid, and using grid status or checkpointinformation to allow another worker node, under the control andsupervision of a control node, to take over the work being performed bythe failed worker node. The work may be redistributed amongst theoperational worker nodes. Alternative embodiments include usingthresholds to determine when, after a predetermined amount of time, itshould be established or assumed that a node has failed. Such adetermination may allow a backup control node to take over for a failedprimary control node, or a control node to redistribute work beingperformed by a failed worker node to another worker node. The nodeswithin the communications grid may be able to detect a hierarchy orperform other methods for determining which nodes should take actionafter a failure. Such embodiments of the present technology aredescribed herein with respect to FIGS. 2-23.

Various communications grids described herein are described as includingone or more control nodes (e.g., a primary control node, backup controlnode, etc.) and one or more worker nodes. A node may be, for example, acomputing device such as a computer, or a different type of network orelectronic device such as, for example, a server or router. Controlnodes may maintain knowledge of the status of the nodes in the grid(e.g., grid status information), accept work requests from clients,subdivide the work across worker nodes (both initially and after aworker node failure), coordinate the worker nodes, among otherresponsibilities. Worker nodes may accept work requests from a controlnode and provide the control node with results of the work performed bythe worker node. A grid may be started from a single node (e.g., amachine, computer, server, etc.). This first node may be assigned or maystart as the primary control node that will control any additional nodesthat enter the grid.

To add another node or machine to the grid, the primary control node mayopen a pair of listening sockets, for example. The sockets may be usedfor different reasons related to the jobs of the control node. The firstof these sockets may be used to accept work requests from clients, andthe second socket may be used to accept connections from other gridnodes (e.g., worker nodes or other control nodes). The primary controlnode may be provided with a list of other nodes (e.g., other machines,computers, servers) that will participate in the grid, and the role thateach node will fill in the grid. The primary control node may maintain adatabase of all configured nodes in the grid. The database may be in avariety of forms, including, for example, a memory table, a simple textfile, a full configuration file, on a configuration server, amongothers. Upon startup of the primary control node (e.g., the first nodeon the grid), the primary control node may use a network protocol (e.g.,Secure Shell Protocol, or SSH) to start the server process on everyother node in the grid. Command line parameters, for example, may informeach node of one or more pieces of information, such as: the role thatthe node will have in the grid, the host name of the primary controlnode, the port number on which the primary control node is acceptingconnections from peer nodes, among others. The information may also beprovided in a configuration file, transmitted over a secure shelltunnel, recovered from a configuration server, among others. While theother machines in the grid may not initially know about theconfiguration of the grid, that information may also be sent to eachother node by the primary control node. Updates of the grid informationmay also be subsequently sent to those nodes.

For any control node other than the primary control node added to thegrid, the control node may open three sockets. The first socket mayaccept work requests from clients, the second socket may acceptconnections from other grid members, and the third socket may connect(e.g., permanently) to the primary control node. When a control node(e.g., primary control node) receives a connection from another controlnode, it first checks to see if the peer node is in the list ofconfigured nodes in the grid. If it is not on the list, the control nodemay clear the connection. If it is on the list, it may then attempt toauthenticate the connection. Authentication of a node is describedfurther herein with respect to FIGS. 16 and 17. If authentication issuccessful, the authenticating node may transmit information to itspeer, such as the port number on which a node is listening forconnections, the host name of the node, information about how toauthenticate the node, among other information. When a node, such as thenew control node, receives information about another active node, itwill check to see if it already has a connection to that other node. Ifit does not have a connection to that node, it may then establish aconnection to that control node.

Any worker node added to the grid may establish a connection to theprimary control node and any other control nodes on the grid. Afterestablishing the connection, it may authenticate itself to the grid(e.g., any control nodes, including both primary and backup, or a serveror user controlling the grid). Authentication of a node is describedfurther herein with respect to FIGS. 16 and 17. After successfulauthentication, the worker node may accept configuration informationfrom the control node.

The grid may add new machines at any time, initiated from any controlnode. Upon adding a new node to the grid, the control node may first addthe new node to its table of grid nodes. The control node may also thennotify every other control node about the new node. The nodes receivingthe notification may acknowledge that they have updated theirconfiguration information.

FIG. 2 illustrates a communications grid 200 including a control nodeand one or more worker nodes, according to embodiments of the presenttechnology. Communications grid 200 includes control node 202, labeledas control node A. Communications grid 200 also includes one or moreworker nodes. Shown in FIG. 2 are six worker nodes, worker node 210(labeled as worker node 1), worker node 212 (labeled as worker node 2),worker node 214 (labeled as worker node 3), worker node 216 (labeled asworker node n−2), worker node 218 (labeled as worker node n−1), andworker node 220 (labeled as worker node n). Although FIG. 2 shows sixworker nodes, a communications grid according to embodiments of thepresent technology may include more or less than six worker nodes. Forexample, a communications grid may include one, two, or any other numberof worker nodes. Each worker node within the communications grid 200 isconnected (wired or wirelessly, and directly or indirectly) to controlnode 202. Therefore, each worker node may receive information fromcontrol node 202 (e.g., an instruction to perform work on a project) andmay transmit information to control node 202 (e.g., a result from workperformed on a project). However, in certain embodiments, worker nodesmay not, for example, be connected (communicatively or otherwise) toother worker nodes. For example, worker nodes may only be able tocommunicate with the control node that controls it, and may not be ableto communicate with other worker nodes in the communications grid,whether they are other worker nodes controlled by the control node thatcontrols the worker node, or worker nodes that are controlled by othercontrol nodes in the communications grid. In alternative embodiments,worker nodes may communicate with each other (either directly orindirectly). For example, worker nodes may transmit data between eachother related to a job being performed or an individual task within ajob being performed by that worker node. Alternatively, worker nodes maycommunicate with each other to perform broadcast or reductionoperations, for example such as those discussed herein with respect toFIGS. 22 and 23, respectively.

A control node, such as control node 202, may connect with an externaldevice with which the control node may communicate (e.g., a grid user,such as a server or computer, may connect to a primary controller of thegrid). For example, a server or computer may connect to control node 202and may transmit a project or job to the node. The project may include adata set. The data set may be of any size. Once the control nodereceives such a project including a large data set, the control node maydistribute the data set or projects related to the data set to beperformed by worker nodes. Alternatively, for a project including alarge data set, the data set may be receive or stored by a machine otherthan a control node (e.g., a Hadoop data node). Such a structure mayprevent a bottleneck problem.

When a project is initiated on communications grid 200, control node 202controls the work to be performed for the project (e.g., on the dataset). Since the worker nodes in the communications grid 200 will performthe work to complete each task within the project, control node 202assigns work from the project to each worker node. Control nodecoordinates the work such that each worker node has a portion of theproject that the worker node can handle and can execute and in theamount of time desired by the user or by the control node. For example,the control node may distribute work to the worker nodes based onvarious factors, such as which subsets or portions of projects may becompleted most efficiently and in the correct amount of time. Forexample, a worker node may perform analysis on a portion of data that isalready local (e.g., stored on) the worker node. The control node alsocoordinates the results of the work performed by each worker node aftereach worker node executes and completes its job. For example, thecontrol node may receive a result from one or more worker nodes, and thecontrol node may organize the results received and compile them toproduce a complete result for the project received from the end user.

The worker nodes within communications grid 200 perform work on theportion of the project that is assigned to the worker node by controlnode 202. After the worker node receives an instruction or project (orportion of a project) from the control node, the worker node executesthe instruction as assigned, and may produce a result. The worker nodemay then transmit the result back to the control node 202 (or to anyother network device or external device as designated by the assignmentor instructions from control node 202 that was delivered with or afterthe assignment).

When a node joins the communications grid 200 (e.g., when the node ispowered on or connected to an existing node on the grid or both), thenode is assigned (e.g., by an operating system of the grid) auniversally unique identifier (UUID). This unique identifier may helpother nodes and external entities (devices, users, etc.) to identify thenode and distinguish it from other nodes. When a node is connected tothe grid, the node may share its unique identifier with the other nodesin the grid. Since each node may share its unique identifier, each nodemay know the unique identifier of every other node on the grid. Uniqueidentifiers may also designate a hierarchy of each of the nodes (e.g.,backup control nodes) within the grid. For example, the uniqueidentifiers of each of the backup control nodes may be stored in a listof backup control nodes to indicate an order in which the backup controlnodes will take over for a failed primary control node to become a newprimary control node. However, a hierarchy of nodes may also bedetermined using methods other than using the unique identifiers of thenodes. For example, the hierarchy may be predetermined, or may beassigned based on other predetermined factors.

When a project is submitted for execution (e.g., by a client or acontroller of the grid) it may be assigned to a set of nodes. One of thecontrol nodes may be assigned as a primary control node for the job. Anyremaining control nodes may be assigned as backup control nodes for theproject. All active worker nodes may be assigned to the project.However, in some embodiments, a subset of worker nodes may be assignedto the project for projects requiring lower resources. After the nodesare assigned to a project, a data structure (i.e., a communicator) maybe created. The communicator may be used by the project for informationto be shared between the project code running on each node. Acommunication handle may be created on each node. A handle, for example,is a reference to the communicator that is valid within a single processon a single node, and the handle may be used when requestingcommunications between nodes.

Within a communicator, each worker node and the primary control node mayeach be assigned a rank. Each rank, for example, may be a non-negativeinteger. When combined with a communicator handle, a node's rank may beused to communicate with a the code running in the same project onanother node. Unlike a unique identifier assigned to the node, a rankmay only be unique within a communicator. Therefore, the same ranknumber may refer to different nodes in the grid across differentprojects. When the project code identifies a specific node in the grid,it may use the UUID that is assigned to that node since such UUIDs maybe permanent.

As noted, communications grid 200 includes a single control node,control node 202. Therefore, if control node 202 fails, for example ifcontrol node 202 is shut off, breaks, or otherwise fails or becomesunavailable to control and coordinate the worker nodes that areconnected to it, then the communications grid 200 may fail. In otherwords, if control node 202 fails, then any project or job being run oncommunications grid 200 may fail and may not complete. While the projectmay be run again, such a failure may cause a delay (severe delay in somecases, such as overnight delay) in completion of the project. Therefore,a fault tolerant system with multiple control nodes, including a backupcontrol node, may be beneficial.

FIG. 3 illustrates a communications grid 300 including two control nodesand one or more worker nodes, according to embodiments of the presenttechnology. Communications grid 300 includes control node 302 andcontrol node 304. Control node 302 and control node 304 arecommunicatively connected via communication path 351. Therefore, controlnode 302 and control node 304 may transmit information, includinginformation related to the communications grid or notifications, to andreceive information from each other. Although communications grid 300 isshown in FIG. 3 as including two control nodes, the communications gridmay include more than two control nodes (for example, as shown in FIG.7) or less than two control nodes (as shown, for example, in FIG. 5).

Communications grid 300 also includes one or more worker nodes. Shown inFIG. 3 are six worker nodes: worker node 310 (or worker node 1), workernode 312 (or worker node 2), worker node 314 (or worker node 3), workernode 316 (or worker node n−2), worker node 318 (or worker node n−1), andworker node 320 (or worker node n). Although FIG. 3 shows six workernodes, a communications grid according to embodiments of the presenttechnology may include more or less than six worker nodes. For example,a communications grid may include one, two, or any other number ofworker nodes. For example, the number of worker nodes included in acommunications grid may be dependent upon how large the project or dataset is being implemented by the communications grid. The number ofworker nodes included in a communications gird may also be dependentupon other factors, such as the capacity of each worker node, the timein which the communications grid would like to complete the project,among others.

As noted, each worker node within the communications grid 300 may beconnected to control node 302 (although in other embodiments only someworker nodes may be connected to control node 302). Therefore, eachworker node may receive information from control node 302 (e.g., aninstruction to perform work on a project) and may transmit informationto control node 302 (e.g., a result from work performed on a project).However, worker nodes may not, in certain embodiments, be connected(communicatively or otherwise) to other worker nodes. For example,worker nodes may only be connected to the control node that controls it,and may not be connected to other worker nodes in the communicationsgrid, whether they share a control node or not. Each worker node withinthe communications grid 300 is also connected to control node 304.Therefore, each worker node may receive information from control node304 and may transmit information to control node 304.

A control node, such as control node 302, may be designated as theprimary control node. A server, computer or other external device mayconnect to the primary control node, such as control node 302. Once thecontrol node receives a project, the primary control node may distributeportions of the project to its worker nodes for execution. For example,when a project is initiated on communications grid 300, primary controlnode 302 controls the work to be performed for the project in order tocomplete the project as requested or instructed. Since the worker nodesin the communications grid 300 will perform the work to complete eachtask within the project, primary control node 302 may assign work fromthe project to each worker node. The primary control node coordinatesthe work such that each worker node has a portion of the project thatthe worker node can handle and can fully execute efficiently. Theprimary control node also coordinates and processes the results of thework performed by each worker node after each worker node executes andcompletes its job. For example, the primary control node may receive aresult from one or more worker nodes, and the control node may organize(e.g., collect and assemble) the results received and compile them toproduce a complete result for the project received from the end user.

Another control node, such as control node 304, may be designated as thebackup control node. Backup control node 304 may not control any portionof a project being implemented by communications grid 300. Instead,backup control node 304 may serve as a backup for primary control node302. For example, backup control node 304 may be able to take over asprimary control node if primary control node 302 were to fail. Primarycontrol node 302 may, for example, transmit one or more communicationsto backup control node 304 (and, for example, to other control or workernodes within the communications grid). Such communications may sentperiodically, at fixed time intervals, between known fixed stages of theproject's execution, among other protocols. The communicationstransmitted by primary control node 302 may be of varied types and mayinclude a variety of types of information. For example, primary controlnode 302 may transmit snapshots (e.g., status information) of thecommunications grid so that backup control node 304 always has a recentsnapshot of the communications grid. The snapshot or grid status mayinclude the structure of the grid (including, for example, the workernodes in the grid, unique identifiers of the nodes, or theirrelationships with the primary control node), the status of a project(including, for example, the status of each worker node's portion of theproject), among other information related to the communications grid orits nodes. The snapshot may also include analysis or results receivedfrom worker nodes in the communications grid for either partial of wholeportions of the project. The backup control node 304 may receive andstore the backup data received from the primary control node 302. Thebackup control node 304 may request such a snapshot (or otherinformation) from the primary control node, or the primary control nodemay send such information periodically to the backup control node.

As noted, the backup data may allow the backup control node to take overas primary control node if the primary control node fails. Morespecifically, the backup data may allow the backup control node tocontinue the project being implemented and controlled by the primarycontrol node after a failure of the primary control node without havingto start the project over from scratch. If the primary control nodefails, the backup control node 304 may retrieve the most recent versionof the snapshot received from the primary control node 302 and use thesnapshot to continue the project from the stage of the project indicatedby the backup data.

Backup control node 304 may use various methods to determine thatprimary control node 302 has failed. In one example of such a method,primary control node 302 may transmit a communication to the backupcontrol node 304 that indicates that the primary control node 302 isworking and has not failed, such as a heartbeat communication. This typeof communication may be transmitted by the primary control nodeperiodically (e.g., once every second, once every five seconds, onceevery millisecond, or any other interval). Backup control node 304 maybe able to determine if primary control node 302 has failed if backupcontrol node 304 has not received a heartbeat communication for acertain predetermined period of time (i.e., a time or heartbeatthreshold), or in other words, has not received a heartbeatcommunication that it expected to receive before a certain amount oftime has passed. For example, primary control node 302 may transmit aheartbeat message every sixty seconds. If backup control node 304 hasnot received a heartbeat message from primary control node 302 for aperiod of more than sixty seconds, for example seventy seconds, thenbackup control node 304 may determine or assume that primary controlnode 302 has failed.

As another example of a method, backup control node 304 may use todetermine or assume that primary control node 302 has failed, backupcontrol node 304 may receive a communication from one or more workernodes, which may be connected to both primary control node 302 and tobackup control node 304, that primary control node 302 has failed. Forexample, a worker node may have recognized that primary control node 302failed to communicate with the worker node. For example, primary controlnode 302 may have failed to respond to a query or request transmitted bythe worker node to the primary control node. In another example, theprimary control node 302 may have failed to transmit an acknowledgement(e.g., ACK) message back to the worker node after the worker node sent acommunication (e.g., a communication including results from a portion ofa job being worked on by the worker node). The backup control node 304may have also, for example, received a communication that the primarycontrol node failed from another device, such as a device external tothe communications grid. For example, an external device (e.g., acontroller) may have received an indication from one or more workernodes that the primary control node failed, and the external device mayhave transmitted a communication to the backup control node that theprimary control node failed. Backup control node 304 may have alsoreceived an indication from primary control node 302 (or elsewhere)directly that the primary control node has or is going to fail. Forexample, the primary control node (or another device) may be able topredict, based on historical data or detected patterns, that the primarycontrol node is going to fail. However, before it fails, the primarycontrol node may transmit (e.g., broadcast or via direct message toother nodes) a communication including an indication that it has or isgoing to fail.

As noted, after backup control node 304 detects or is notified thatprimary control node 302 has failed, backup control node 304 may takeover the responsibilities of the primary control node. Furthermore,control node 304 may continue the project that was being implemented bythe communications grid 300 and controlled by control node 302 by usingdata (e.g., status information) received from the primary control nodebefore it failed. As such, the communications grid may be able to avoidfailure of the project due to a failure in the primary control node.

FIG. 4 illustrates a communications grid 400 including three controlnodes and one or more worker nodes, according to embodiments of thepresent technology. Communications grid 400 includes control node 402,control node 404 and control node 406. Control node 402 and control node404 are communicatively connected via communication path 451. Therefore,control node 402 and control node 404 may transmit information,communications path 451, including information related to thecommunications grid or notifications, to and receive information fromeach other. Control node 402 and control node 406 are communicativelyconnected via communication path 453. Therefore, control node 402 andcontrol node 406 may transmit information, via communication path 453,including information related to the communications grid ornotifications, to and receive information from each other. Control node404 and control node 406 are communicatively connected via communicationpath 455. Therefore, control node 404 and control node 406 may transmitinformation, via, communications path 455, including information relatedto the communications grid or notifications, to and receive informationfrom each other. Although communications grid 600 is shown in FIG. 6 asincluding three control nodes, the communications grid may include morethan three control nodes or less than two control nodes (as shown, forexample, in FIGS. 5 and 6).

Communications grid 400 also includes one or more worker nodes. Shown inFIG. 4 are six worker nodes: worker node 410 (or worker node 1), workernode 412 (or worker node 2), worker node 414 (or worker node 3), workernode 416 (or worker node n−2), worker node 418 (or worker node n−1), andworker node 420 (or worker node n). Although FIG. 4 shows six workernodes, a communications grid according to embodiments of the presenttechnology may include more or less than six worker nodes. For example,a communications grid may include one, two, or any other number ofworker nodes. For example, the number of worker nodes included in acommunications grid may be dependent upon how large the project or dataset is being implemented by the communications grid. The number ofworker nodes included in a communications grid may also be dependentupon other factors, such as the capacity of each worker node, the timedesignated for the communications grid to complete the project, amongothers.

Similar to control node 602 in FIG. 6, a control node, such as controlnode 402, may be designated as the primary control node incommunications grid 400. Primary control node 402 may be configured tohave a similar role (and perform the same or similar functions) incommunications grid 400 as primary control node 602 in communicationsgrid 600 as described with respect to FIG. 6 (and as control node 502 inFIG. 5). The other two control nodes in communications grid 400, such ascontrol nodes 404 and 406, may be designated as backup control nodes.Control nodes 404 and 406 may be referred to herein as backup controlnodes. However, control nodes 404 and 406 may be primary control nodesin other embodiments In such an embodiment where control nodes 404 and406 are backup control nodes, each of the backup control nodes 404 and406 may perform similar functions, either individually or incombination, to backup control node 304 in communications grid 300. Forexample, backup control nodes 404 and 406 may each receive informationregarding the communications grid 400, including periodic snapshots orother information about the communications grid, from the primarycontrol node 402.

Either backup control node 404 or backup control node 406 may, similarto backup control node 304 in communications grid 300, take over orsubstitute for primary control node 402 if primary control node 402 wereto fail. The backup control node that takes over for a failed primarycontrol node 402 may do so such that it may perform similar functions tobackup control node 304 in communications grid 300 after a failure ofprimary control node 302, and thus may continue the functions orprojects being performed by failed primary control node 402. Forexample, the backup control node, either backup control node 404 orbackup control node 406, may control the worker nodes that wereconnected to primary control node 402 before primary control node 402failed (and which, as noted, may also be connected to control nodes 404and 406) and control the project or projects being performed by thoseworker nodes.

Different methods may be performed to determine which backup controlnode of a set of backup control nodes (e.g., backup control nodes 404and 406) will take over for failed primary control node 402 and becomethe new primary control node. For example, the new primary control nodemay be chosen based on the unique identifiers assigned to each backupcontrol node (e.g., whichever backup control node has the higher orlower unique identifier). Such a ranking of unique identifiers may becalled a “hierarchy” of the backup control nodes. In an alternativeembodiment, a backup control node may be assigned to be the new primarycontrol node by another device in the communications grid (e.g., thefailed primary control node 402) or from an external device (e.g., asystem infrastructure or an end user, such as a server or computer,controlling the communications grid). In another alternative embodiment,the backup control node that takes over as the new primary control nodemay be designated based on bandwidth or other statistics about thecommunications grid. For example, the decision may be based on whichnode has more bandwidth, which node includes a more recent version of asnapshot of the communications grid, which node is better equipped(e.g., using statistics about the node or the rest of the communicationsgrid) to handle the current project being executed by the communicationsgrid, among others. Since the backup control nodes may communicate witheach other (e.g., via communication paths 451, 453 and 455), an internalalgorithm may be executed, or information may be shared between thebackup control nodes, to designate one of the backup control nodes asthe new primary control node.

FIG. 5 illustrates a communications grid 500 including two control nodesand one or more worker nodes, according to embodiments of the presenttechnology. Communications grid 500 includes primary control node 502and backup control node 504. Primary control node 502 and backup controlnode 504 may have similar roles in communications grid 500 as controlnodes 602 and 604, respectively, in communications grid 600 in FIG. 6.Primary control node 502 and backup control node 504 are communicativelyconnected via communication path 551. Therefore, primary control node502 and backup control node 504 may transmit information, includinginformation related to the communications grid or notifications, to andreceive information from each other. Although communications grid 500 isshown in FIG. 5 as including two control nodes, the communications gridmay include more than two control nodes (for example, as shown in FIG.4) or less than two control nodes (as shown, for example, in FIG. 5).

Communications grid 500 also includes one or more worker nodes. Shown inFIG. 5 are four worker nodes: worker node 510 (or worker node 1), workernode 512 (or worker node 2), worker node 514 (or worker node 3), andworker node 516 (or worker node 4. Although FIG. 5 shows four workernodes, a communications grid according to embodiments of the presenttechnology may include more or less than four worker nodes.

As noted, a primary control node (e.g., primary control node 502) maytransmit snapshots of the communications grid so that a backup controlnode (e.g., backup control node 504) always has a recent snapshot of thecommunications grid. For example, as shown in FIG. 5, primary controlnode 502 may transmit communications grid snapshot 540 to backup controlnode 504. The snapshot may include the structure of the grid includingthe worker nodes in the grid and their relationships with the primarycontrol node, the status of a project (including, for example, thestatus of each worker node's portion of the project), among otherinformation. The snapshot may also include analysis or results receivedfrom worker nodes in the communications grid for either partial of wholeportions of the project. The snapshot may also include any otherinformation that assists the backup control node to continue processingthe job from a known state of the job after a primary control nodefailure. The backup control node 504 may receive and store snapshot 540received from the primary control node 502. The backup control node 504may initiate a receipt of a snapshot of the communications grid byrequesting such a snapshot (or other information) from the primarycontrol node, or the primary control node may send such informationperiodically to the backup control node. Backup control node 504 maystore snapshot 540 in storage, such as in local storage 525. Localstorage 525 may be a short term storage, such as cache, or a more longterm storage within backup control node 504. In an alternativeembodiment, backup control node 504 may store snapshot 540 (or otherdata) in a remote location. For example, backup control node 504 may,after receiving communications grid snapshot 540 from primary controlnode 502, transmit snapshot 540 to a storage external to backup controlnode 504. Backup control node 504 may then, upon receiving or detectinga notification of a failure of a primary control node, retrieve a storedgrid snapshot, such as snapshot 540, from storage.

FIG. 6 illustrates a communications grid 600 including two controlnodes, including a backup control node with a stored grid snapshot, andone or more worker nodes, according to embodiments of the presenttechnology. More specifically, FIG. 6 illustrates that primary controlnode 602 may fail (indicated by dotted lines), and therefore thatcommunication paths between the primary control node 602 and other nodeson the communications grid (e.g., path 651 between primary control node602 and backup control node 604 as well as those paths between primarycontrol node 602 and worker nodes 610-616) may be severed because ofsuch a failure. However, as shown in communications grid 600, backupcontrol node 604 may be communicatively connected (e.g., wired orwirelessly) to each of the worker nodes within communications grid 600.As noted, the backup data may allow the backup control node to take overas primary control node if the primary control node fails. Morespecifically, the backup data may allow the backup control node tocontinue the project being implemented and controlled by the primarycontrol node after a failure of the primary control node without havingto start the project over from scratch. If the primary control nodefails, the backup control node 504 may retrieve the most recent version(or another stored version, if applicable) of the snapshot received fromthe primary control node 502 and use the snapshot (and other backupdata) to continue the project from the stage of the project indicated bythe backup data.

FIG. 7 illustrates a communications grid 700 including two controlnodes, including a backup control node with a stored grid snapshot andone or more worker nodes, according to embodiments of the presenttechnology. Communications grid 700 is similar to communications grid600, but further illustrates that backup control node 704 may receivenotification of a failure of the primary control node 702 from severaldifferent sources. As noted, a backup control node (e.g., backup controlnode 704) may replace a primary control node (e.g., primary control node702) as a new primary control node within the communications grid (e.g.,communications grid 700) upon the failure of the primary control node.Backup control node 704 may be notified that primary control node 702has failed in a variety of different ways. For example, backup controlnode 704 may receive a communication including a notification, such ascommunication 745, including an indication that primary control node 702has failed or will fail within a certain amount of time. Backup controlnode 704 may receive such a notification from primary control node 702itself. Primary control node 702 may identify that it has or will failand subsequently or simultaneously transmit a notification of this issueto backup control node 704, to another node or group of nodes on thegrid, or to a server or administrator (e.g., server/administrator 760)or another system infrastructure internal or external to thecommunications grid. Backup control node may then receive acommunication 745 from the server or administrator 760. For example,such a notification may come after the server or administrator 760 hasreceived such a notification from the primary control node 702.Alternatively, the server or administrator 760 may have received such anotification from a worker node within the grid, or from another source.In another alternative example, the server or administrator 760 maytransmit periodic heartbeat messages to the primary control node 702 todetermine whether primary control node 702 is working (i.e. has notfailed), and may have initiated a notification transmitted to backupcontrol node 704 because it determined that primary control node 702failed since it did not receive a response to one or more of itsheartbeat messages for a certain predetermined period of time. Backupcontrol node 704 may then receive a notification of a primary controlnode failure directly from a worker node, such as from worker node 716as shown in FIG. 7.

FIG. 8 illustrates a communications grid 800 including a new primarycontrol node and former backup control node, and one or more workernodes, according to embodiments of the present technology.Communications grid 800 includes new primary control node 804, which mayhave transitioned from being a former backup control node before aprevious primary control node failed. As shown in FIG. 8, new primarycontrol node 804 is, as it was when it was a backup control node,connected to one or more worker nodes. In communications grid 800, newprimary control node 804 is connected to worker nodes 810, 812, 814, and816. However, new primary control node 804 may be connected to a feweror greater number of worker nodes than the four worker nodes shown inFIG. 8. New primary control node 804 may substitute or take over for aprevious primary control node in the same capacity or functionality asthe former, now failed, primary control node. In other words, newprimary control node 804 may control the project being run on thecommunications grid 800, and therefore may control the worker nodesconnected to it and executing different portions of the project.

New primary control node 804, upon becoming the primary control nodewithin communications grid 800, may begin the project anew (for example,if the last known state of the grid as stored by the new primary controlnode is the beginning of the project). In another embodiment, newprimary control node 804 may roll back to a checkpoint by resuming workon the project at a checkpoint at some point during the progress of theproject being executed. In an embodiment, new primary control node 804may resume execution of the project, along with the worker nodesconnected to it, from the exact point where the former primary controlnode left off. In another embodiment, new primary control node 804 mayresume execution of the project from a checkpoint (i.e., rolling back toa checkpoint) that is at a point in the project previous to the pointwhere the previous primary control node left off. The new primarycontrol node 804 may obtain information about this checkpoint using asnapshot of the grid retrieved from storage within new primary controlnode 804 or from storage within another node or another device.

FIG. 9 illustrates a communications grid 900 including a primary controlnode and one or more worker nodes, according to embodiments of thepresent technology. Communications grid 900 includes new primary controlnode 902 and worker nodes 910, 912, 914 and 916. As noted, primarycontrol node 902 may distribute the work within a project being executedto each of the worker nodes within the communications grid such thateach worker node performs or executed a portion of the project. Forexample, as shown in FIG. 9, worker nodes 910, 912, 914 and 916 may eachbe assigned a one-quarter portion of the project being executed by thecommunications grid 900 and being controlled by primary control node902. For example, primary control node 902 may transmit instructions tothe worker nodes, for example via communications paths 960, 962, 964 and966, respectively. Furthermore, the worker nodes may also transmitinformation primary control node 902. For example, the worker nodes maygenerate (and, for example, locally store) and transmit checkpoints oftheir progress within a project, or their assigned portion of a project,to primary control node 902 so that primary control node 902 receivesand stores periodic checkpoints or statuses of the progress of each ofthe worker nodes. The received checkpoints for each worker node mayallow primary control node 902 to compile statuses of the progress ofthe project being executed on the communications grid. The checkpointsmay allow primary control node 902 to generate a snapshot of thecommunications grid, or the checkpoints may be treated as separate,independent data to be used in other capacities by the primary controlnode. After the checkpoints are received, they may be stored by theprimary control node in storage 925. The primary control node 902 mayalso store any data generated from the checkpoints, including forexample a snapshot of the communications grid.

Checkpoints may be generated by a worker node (or a control node) aftera stage of the project has been completed (e.g., if the project is amulti-stage operation). Alternatively, checkpoints may be generatedafter a certain amount or amounts of the project (e.g., a certainpercentage) have been completed (e.g., if the project includes a largedata set). The method of generating and saving or transmittingcheckpoint information may be chosen based on the project and/orsituation by the primary control node (or, in other embodiments, byother nodes on the grid or by a user external to the grid).

In some situations, failure can occur at worker nodes. FIGS. 10-12illustrate a communications grid including a control node and one ormore worker nodes, according to embodiments of the present technology.Communications grid 1000 includes primary control node 1002 and workernodes 1010, 1012, 1014 and 1016. As noted, primary control node 1002 maydistribute the work within a project or data set being executed to eachof the worker nodes within the communications grid such that each workernode performs or executed a portion of the project. For example, asshown in FIG. 10, worker nodes 1010, 1012, 1014 and 1016 may each beassigned a one-quarter portion of the project being executed by thecommunications grid 1000 and being controlled by primary control node1002. The worker nodes may transmit checkpoints of their progress withina project, or their assigned portion of a project, to primary controlnode 1002 so that primary control node 1002 receives and stores periodiccheckpoints or statuses of the progress of each of the worker nodes.Communications grid 1000 also shows that one of the worker nodes, workernode 1012 may fail (indicated by dotted lines in FIG. 10), and thereforethat communication paths between the worker node 1012 and other nodes onthe communications grid (e.g., path 1062 between primary control node1002 and worker node 1012) may be severed because of such a failure.

However, communications grid 1000 may account for a failure of a workernode, such as worker node 1012. As noted, worker node 1012 iscommunicatively connected to primary control node 1002, which maycontrol worker node 1012 and/or the work being performed by worker node1012. If worker node 1012 fails, then primary control node 1002 maydetect that worker node 1012 has failed or may receive a notificationthat worker node 1012 has failed. For example, primary control node 1002may be notified that worker node 1012 has failed by another worker node(e.g., worker node 1010, 1014 and/or 1016, which are alsocommunicatively connected to primary control node 1002) or, if oneexists, another control node (e.g., a backup control node) oncommunications grid 1000. Alternatively, primary control node 1002 maybe notified by a user (e.g., server or administrator 1170 in FIG. 11 ofthe grid via communication 1172, as shown within communications grid1100 in FIG. 11, discussed further herein). Alternative embodimentsinclude using thresholds to determine when, after a predetermined amountof time, it should be established or assumed that a worker node hasfailed. For example, if a worker node has not transmitted anacknowledgement communication (e.g., ACK) or another expectedcommunication, as noticed by a control node or other node expected toreceive such a communication, for a certain amount of time that isgreater than a predetermined threshold, it may be assumed that theworker node has failed. Such a determination may allow a control node toredistribute work being performed by a failed worker node to anotherworker node.

To make up for the loss of worker node 1012 after it fails, or in otherwords to make up for the work being assigned to worker node 1012,primary control node 1002 may redistribute the work being performed byworker node 1012 to other worker nodes on communications grid 1000. Forexample, after primary control node 1002 is knows that worker node 1012has failed, primary control node 1002 may transmit a communication(e.g., message or notification) to each of the other worker nodes (e.g.,all or part of the worker nodes still connected to primary control node1002 and on communications grid 1000) including the portion of the workbeing redistributed from worker node 1012 that they are assigned to workon. For example, as shown in communications grid 1200 of FIG. 12(discussed further herein), primary control node 1002 may transmit acommunication 1274 to worker node 1010, a communication 1576 to workernode 1014, and a communication 1278 to worker node 1016 including suchinformation. After receiving such a communication, worker nodes 1010,1014, and 1016 may add the work identified in their receivedcommunication to the work that it will perform on the project. Forexample, if the remaining work from failed worker node 1012 isredistributed equally between worker node 1010, 1014, and 1016, each ofworker nodes 1010, 1014, and 1016 may be assigned one-third of the totalwork remaining for the project after such work has been reassigned.However, other portions or breakdowns of the work are also possible. Forexample, an alternative may include adding a new worker node to the gridto take on the additional work.

In an alternative embodiment, primary control node 1002 may transmit acommunication (e.g., break communicator message) to each of the workernodes still on communications grid 1000 including a message that each ofthe worker nodes should purposefully fail also. In other words, themessage may include or cause a communication error within each workernode so that each of the worker nodes still on the grid fail. After eachof the worker nodes fails, they may each retrieve their most recentsaved checkpoint of their status. Each worker node may also retrieve thestatus or checkpoint of the first failed worker node, worker node 1012.For example, as shown in FIG. 12, primary control node 1002 may transmitthe checkpoint 1242 of failed worker node 1012 to worker nodes 1010,1014 and 1016. This may allow each of the still existing (e.g.,non-failed) worker nodes to continue work on the project from their mostrecent checkpoint at the same time and so they do not miss any of thework to be performed on the project. This may also allow the workernodes to continue work on the work redistributed from the failed workernode at the point where worker node 1012 failed when performing thework. Using such a checkpoint may allow the worker nodes to be efficientso as to not duplicate work already completed or to not miss work thatneeds to be completed. Such checkpoints may be stored within each workernode or may be retrieved from another device or source (e.g., anotherworker node, a control node, a cloud network, or other location). It maybe helpful to store checkpoints in devices other than at a backupcontrol node in case, for some reason, the backup control node has notstored the checkpoint, or in case the backup control node fails and anew control node joins the grid at a later time. In such an embodiment,a worker node or other devices or networks that has stored thecheckpoint may transmit the checkpoint or other status information tothe new control node.

FIG. 13 is a flow chart 1300 showing an example process for adjusting awork project in a communications grid after a failure of a control node,according to embodiments of the present technology. The process mayinclude, for example, receiving, at a backup control node connected to aprimary control node and a worker node on a communications grid, gridstatus information, the grid status information including a projectstatus of the primary control node or a project status of the workernode, wherein the project status of the primary control node and theproject status of the worker node include a status of one or moreportions of a project being executed by the primary and worker nodes inthe communications grid (step 1302). The process may also includestoring the grid status information within the backup control node (step1304). The process may also include receiving a failure communicationincluding an indication that the primary control node has failed (step1306). The process may also include designating the backup control nodeas a new primary control node based on the failure communication uponreceiving the failure communication (step 1308). The process may alsoinclude receiving updated grid status information based on theindication that the primary control node has failed, wherein the updatedgrid status information includes an updated project status of theprimary control node or an updated project status of the worker node(step 1310). The process may also include transmitting a set ofinstructions based on the updated grid status information, wherein theset of instructions includes instructions for the worker nodes tocontinue work on the project after failure of the primary control node(step 1312).

FIG. 14 is a flow chart 1400 showing an example process for adjusting awork project in a communications grid after a failure of a worker node,according to embodiments of the present technology. The process mayinclude, for example, transmitting, at a primary control node connectedto one or more worker nodes on a communications grid, workerinstructions related to a project being executed by the one or moreworker nodes (step 1402). The process may also include generating asnapshot of the communications grid, wherein the snapshot of thecommunications grid includes a project status of each of the one or moreworker nodes, wherein a project status of a worker node includes aproject checkpoint of a portion of the project being executed by theworker node in the communications grid (step 1404). The process may alsoinclude determining that a failed worker node of the one or more workernodes has failed at a failure time (step 1406). The process may alsoinclude determining a project status of the failed worker node using thesnapshot of the communications grid, wherein the project status of thefailed worker node includes a project checkpoint of the failed workernode at the failure time of the failed worker node (step 1408). Theprocess may also include transmitting updated worker instructions,wherein the updated worker instructions include the project status ofthe failed worker node and updated instructions related to the projectbeing executed by the one or more worker nodes, wherein when the updatedworker instructions are received, a functioning worker node completesthe portion of the project being executed by the failed worker node(step 1410).

FIG. 15 is a flow chart 1500 showing an example process for adjusting awork project in a communications grid after a failure of a control node,according to embodiments of the present technology. The process mayinclude, for example, receiving, by a backup control node in acommunications grid, an initial communication including an indicationthat a primary control node is connected to the communications grid(step 1502). The process may also include receiving a snapshot of thecommunications grid, wherein the snapshot of the communications gridincludes a worker status of each of a plurality of worker nodesconnected to the primary control node and the backup control node (step1504). The process may also include determining a time period since theinitial communication was received (step 1506). The process may alsoinclude comparing the time period with a threshold time period todetermine that the primary control node has failed, wherein uponreceiving the failure communication, the backup control node is a newprimary control node (step 1508). The process may also includetransmitting a set of instructions based on the worker status of one ormore worker nodes of the plurality of worker nodes, wherein the set ofinstructions includes instructions for continuing work on the projectafter failure of the primary control node (step 1510).

FIG. 16 is a flow chart 1600 showing an example process forauthenticating a connection between nodes from the perspective of a gridserver (e.g., from an established node on a grid), according toembodiments of the present technology. As noted, when a control node(e.g., primary control node) receives a connection from another controlnode, it may first check to see if the peer node is in a stored list ofconfigured nodes in the grid. If it is not on the list, it may clear(i.e. refuse) the connection. If it is on the list, it may then attemptto authenticate the connection so as to make sure that the new nodebelongs on the grid. Authentication may be shown through the exchange ofdifferent types of messages that allow for either one-way or two-wayauthentication. For example, the different types of messages mayinclude:

-   -   MSG_AUTH_TOKEN_RSP (“ATR”). This message may mean that a block        of authentication data is being sent, and the reply should to        include a block of data. The message may include an algorithm        identifier. The expected response may be MSG_AUTH_TOKEN_RSP,        MSG_AUTH_TOKEN_NO_RSP or MSG_AUTH_FAILED.    -   MSG_AUTH_TOKEN_NO_RSP (“ATNR”). This message may mean that a        block of authentication data is provided, and no further        authentication data is needed in response. The message may        include an algorithm identifier. An example ATNR message may        include a username and/or password, or other types of messages.    -   MSG_AUTH_COMPLETE (“ATC”). This message may include an        indication that authentication has completed successfully.    -   MSG_AUTH_FAILED (“ATF”). This message may indicate that        authentication failed. The message may include a diagnostic        failure code.

As shown in FIG. 16, an authenticating node may wait for a message(block 1602) and receive a message (block 1604). When the message isreceived, the node may determine if the message is either an ATR or ATNRmessage (block 1606). If the message is neither an ATR or ATNR message,then the node may transmit an ATF message and process may end. If themessage is determined to be an ATR or ATNR message, then theauthenticating node may, at 1610 and 1612, validate the data received.If the data is valid, and the message was an ATR (as determined at block1614), then the node may generate a response to the ATR at block 1616because the ATR message requires a response. Then, the node maydetermine if more authentication data is needed at block 1618, and sendsan ATR at 1630 if so. If not, then the node may transmit an ATNR at 1620and wait for a response at 1622. At 1624, the node may determine if thereceived response (at block 1622) is an ATC. If so, the authenticationwas successful as shown in block 1640. If not, it may send an ATF inresponse at block 1632 (because authentication failed, as shown inblocks 1634 and 1638).

FIG. 17 is a flow chart 1700 showing an example process forauthenticating a connection between nodes from the perspective of a gridclient (e.g., from a new node on a grid), according to embodiments ofthe present technology. The flow chart 1700 shown in FIG. 17 is verysimilar to flow chart 1600 shown in FIG. 16, except flow chart 1700includes blocks 1702, 1704, 1706 and 1708 to determine if authenticationdata will be needed in response. In block 1702, the node may generateinitial authentication data and then, at block 1704, determine ifauthentication data is needed in response. If so, it may transmit an ATRat 1706 to require authentication data in response. If not, it maytransmit an ATNR at 1728.

As noted, if authentication data is needed in response, anauthenticating node may wait for a message (block 1712) and receive amessage. When the message is received, the node may determine if themessage is either an ATR or ATNR message (block 1714). If the message isneither an ATR or ATNR message, then the node may transmit an ATFmessage (block 1736) and process may end because the process failed (asshown in nodes 1738 and 1740). If the message is determined to be an ATRor ATNR message, then the authenticating node may, at 1718 and 1720,validate the data received. If the data is valid, and the message was anATR (as determined at block 1722), then the node may generate a responseto the ATR at block 1724 because the ATR message requires a response.Then, the node may determine if more authentication data is needed atblock 1726, and sends an ATR at 1715 if so. If not, then the node maytransmit an ATNR at 1728 and wait for a response at 1730. At 1732, thenode may determine if the received response is an ATC. If so, theauthentication was successful as shown in block 1742. If not, it maysend an ATF in response at block 1636. Referring back to node 1722, ifthe message is determined to not be an ATR, then an ATC message may besent (at node 1740) because the authentication was successful (as shownin FIG. 1742).

FIG. 18 is a flow chart 1800 showing an example process to assign a listof nodes (numbered m through n) as children to a node, such as a controlnode, according to embodiments of the present technology. At block 1802,node m may be assigned a as a left child (e.g., worker) node. Then, tocheck to see if other child nodes exist, it may be determined at block1804 if n−m=1, or in other words whether the last child assigned (m) isless than or equal to the total number of children (n). If so, theprocess may end. If not, node m+1 may be assigned as a right child atblock 1806. The process of checking to see if other children exist isreproduced in block 1808 by checking to see if m−n=2. If so, then theprocess may end. If not, then the algorithm m+2+((m−n−2)/2) may be usedto determine the “mid” children values at block 1810. The algorithm canbe used recursively to assign nodes m+2 through mid to be children ofthe left child and to assign nodes mid+1 through n to be children of theleft child. After “mid” is computed, the algorithm may be called twomore times. The first time that it is called, it may be called wherenew_m=old m+2 and new_n=mid. The second time that it is called, it maybe called where new_m=mid+1 and new_n=old n.

FIG. 19 is a flow chart 1900 showing an example process for a primarycontrol node to distribute work for a client project between the othernodes in a communications grid, according to embodiments of the presenttechnology. In block 1902, the primary control node determines how todistribute the work to the worker nodes (and if such distribution ispossible). For example, this step may take place after worker nodes havebeen assigned and authenticated on the grid, as described in FIGS.16-18. The primary control node may then determine, at block 1904, ifthe grid includes enough worker nodes to complete the stage of the work.If not, the operation or stage may be determined to have failed at block1906. If so, the primary control node may save the state at block 1908and transmit grid snapshot or state information to the backup controlnodes at block 1910. The primary control node may then distribute work(from a certain stage of the work, if the work is in stages) across theworker nodes at block 1912, and wait for the worker nodes to completethe stage or fail at block 1914. It may then be determined if anyworkers failed at block 1916. If one or more workers failed, then one ofseveral processes may take place to remedy the failure. For example, theprimary control node may redistribute work among the rest of the workernodes. In another example, the primary control node may induce failureof all worker nodes (e.g., at block 1918) so that each worker node mayrestart their work at a recent snapshot of the grid's work on theproject. For example, the worker nodes may then restore their work onthe state to a saved state (e.g., using a saved snapshot) at block 1920,and then retry the work on the stage (on which the failed worker nodefailed) at block 1922. Referring back to block 1916, if no workersfailed, then the primary control node may consider at block 1924 whetherthe stage was the final stage of the project. If so, the primary controlnode may report a successful completion at block 1928. If not, then theprimary control node may assign work to the worker nodes for the nextstage in the project at block 1926.

FIG. 20 is a flow chart 2000 showing an example process for a backupcontrol node to receive and store updated status information in acommunications grid, according to embodiments of the present technology.As noted herein, a communications grid may have one, two, three, or morecontrol nodes. FIG. 20 may only apply to a communications grid thatincludes more than one control node. At step 2002, the backup controlnode may wait for a status update to be transmitted by the primarycontrol node. In blocks 2004, 2014, 2023 and 2022, the status or gridsnapshot may be updated. For example, if the status has a predeterminedtime after which the status may expire or terminate (determined, forexample, at block 2004), and that time has been reached, then it may bedetermined if the status is an updated status (e.g., if the backupcontrol node received updated status information, for example in theform of a grid snapshot) at block 2014. If so, then the stateinformation may be saved at block 2023, old or expired statusinformation may be discarded if no longer needed, and the backup controlnode may wait for another status update (e.g., from the primary controlnode). If the status is ready to terminate at block 2004, then thestatus may terminate in blocks 2008, 2010 and 2012. If the status is anormal (e.g., scheduled) termination (as determined at block 2008), thenthe process may terminate at block 1212. If not, then the backup controlnode may log an error message at block 2010 and then terminate at block2012. Referring back to block 2014, if the status does not include anupdated state, then the backup control node may determine that theprimary control node has failed at block 2016. At block 2026, the lateststored state may be restored (e.g., from the primary control node) atblock 2026, and the backup control node may take over as primary controlnode at blocks 2028 and 2018.

FIG. 21 is a flow chart 2100 showing an example process for a workernode during a communications grid computation, according to embodimentsof the present technology. At step 2104, a worker node may accept workas assigned from a control node, and may perform the assigned work untilit has completed the work or until the worker node has failed (at block2106), as determined at block 2108. If the worker node failed, then itmay restore its last saved state (e.g., using a previously stored stateor snapshot) at block 2114 and accept a next work item from the controlnode (e.g., back to block 2104). If the worker node didn't fail, and noerror was found, then the worker node may determine if the completedstate was the final stage of the project at block 2110. If so, then theworker node may report a success at block 2128 and terminate theprocess. If it was not the final stage, then the worker node may move tothe next stage in its assigned work at block 2112. Before any stage isbegun by a worker node, it may save its current state (e.g., at block2104) so that the worker node will have its previous (and recent) statestored in case the worker node fails. The worker node may transmit itsstate at any time that it is requested to do so by, for example, acontrol node and the state may be incorporated as part of a gridsnapshot.

FIG. 22 is a flow chart 2200 showing an example process for broadcastingdata within a communications grid, according to embodiments of thepresent technology. In block 2202, a node may determine if the data thatit would like to broadcast to the rest of the nodes in the grid is large(e.g., greater than 64 KB). If the data is determined to not be large,then the node may determine if the data is running on worker nodes(e.g., not running on a control node) in block 2204. If no, then thenode may, at block 2208, wait for all worker nodes to be ready toreceived data and, at block 2210, transmit the data to each worker nodethat it would like to run the data. If yes, then the node may transmitdata to the worker nodes at block 2210. Referring back to block 2202, ifthe broadcast of data is determined to be large, then the node maydetermine if the data is running on worker nodes in block 2214. If not,then the node may organize the other nodes into a tree (e.g., using thealgorithm shown in FIG. 21) at block 2216. Then, the node may wait forall workers to be ready to receive data at block 2220 (similar to block2208), and then send the data to its immediate worker children nodes atblock 2216. Referring back to block 2214, if it is determined that thedata is running on worker nodes, then the node may inform the controlnode that the worker nodes are yet ready to receive the data (at block2218). Then, the node may wait for a block of data from its immediateparent (e.g., a control node) at block 2222, copy data to an outputbuffer at block 2224, and resend data to any of its immediate workerchildren nodes at block 2226. Then, it may be determined if all data hasbeen received by the worker nodes at block 2228. If so, then the processmay end. If not, then it may revert back to block 2222 and wait, again,for a block of data from its immediate parent node.

FIG. 23 is a flow chart 2300 showing an example process for a reductionalgorithm within a communications grid, according to embodiments of thepresent technology. In other words, flow chart 2300 shows a process forobtaining input data from several or every node in a communicationsgrid, and performing an operation to obtain a single result block basedon that data. As described herein, embodiments of the present technologyrestrict reduction operations so that it is required that the block ofdata be the same size on every node, and that the operation not dependon the order of operations. A reduction operation can be performed on asingle object on each node, or on a list of objects on each node. Commonreduction operations may include: multiply (e.g., find the product ofall of the values on all of the nodes), sum (e.g., find the sum of allof the values on all of the nodes), minimum (e.g., find the smallestvalue on all of the nodes), and maximum (e.g., find the largest value onall of the nodes), among others.

Flow chart 2300 may begin with a determination of whether the reductionis large (block 2302). If so, the grid may organize the nodes into atree (block 2304), break input buffer into blocks (block 2306), and copythe next block into the reduction buffer (block 2308). For example, anode may include three buffers: (1) an input buffer, which may containdata originating from the local machine; (2) an output buffer, presenton the control node; and (3) a “reduction buffer,” which may be atemporary buffer on each node that can be used to compute a partialresult for itself and all child nodes connected to it. The output buffermay be the same size as the input buffer (although larger than thereduction buffer), and the output buffer may represent the result of thereduction operation across all nodes in the grid. In step 2306, theinput buffer may be subdivided into blocks, so that each block is smallenough to fit into the reduction buffer. In an example embodiment, ifthe input and output buffers each contain a million double precisionnumbers to be reduced with an addition operation, the reduction buffermay be large enough to contain 5,000 double precision numbers. In thatexample, the input buffer may be split up into 200 blocks of 5,000double precision numbers each.

Each time step 2308 is reached, a single block of data may be copied outof the input buffer and into the reduction buffer. The grid may thendetermine whether the block has any direct children (block 2326). If no,then the grid may check to see if the block has a parent node (block2332). If yes, the grid may then send a “ready to receive” signal to thedirect children (block 2328), wait for data blocks to be sent from thechildren (block 2316), and merge the child data blocks into the buffer(block 2317), for example the reduction buffer. Then, the grid may checkto see if the block has a parent node (block 2332). If no, then the gridmay copy the reduction buffer to the output buffer (block 2330). Forexample, since the contents of the reduction buffer may contain theresult for a subset of the data, that result may then be copied into thecorrect portion of the output buffer. If any more blocks of data fromthe input buffer still need to be processed (step 2338), execution maycontinue with step 2308. Referring back to block 2332, if the block doeshave a parent node, then the grid may then wait for a “ready to receive”signal from the parent (block 2328) and send a reduction buffer to theparent (block 2336). For example, the reduction buffer may contain theresult of the reduction operation for a single block of data for thesubtree of the grid rooted at the current node. When the parent node isready to receive more information, the contents of the current node'sreduction buffer may be forwarded to its parent node, so that its parentnode can continue the operation. The grid may then check to see if allblocks have been processed at block 2338. If not, then the flow chartreverts back to block 2308 to copy the next block into the reductionbuffer. If so, then the process moves to block 2338 to determine if allblocks have been processed.

Referring back to block 2302, if the reduction is determined to not belarge, the grid may determine if it is running on a control node atblock 2310. If not, the grid may wait for a “ready to receive” signalfrom the control node (block 2314), send all data to the control node(block 2316), and end the process. If so, then the grid may copy localdata into an output buffer (block 2312), and send a “ready to receive”signal to all worker nodes (block 2318), receive data from a worker nodeas available (block 2320), and merge the data into an output buffer(block 2322). At block 2324, the grid determines if all data has beenreceived. If not, then the process reverts back to block 2318. If so,then the process ends.

An example set of operations available at a communicator handle of anode (e.g., a control node) are described as follows.

-   -   send_state_to_backups: available to the primary control node.        This will send a block of state data to every backup control        node. This will allow the primary control node to establish a        last known state in the backup control nodes that can be used        upon failure of the primary node. This call will block until        every backup control node has received the information. If there        are no backup control nodes, this call does nothing.    -   get_state_from_primary: available to backup control nodes. This        will receive status information. Status will take one of 4        forms: a) Ready for normal termination b) Ready for abnormal        termination c) primary control node has failed, and this control        node has been selected to act as the new primary. d) Primary        control node state information. The fourth form will include a        block of state data from the primary control node. This block        should be used in the event that the backup takes over as the        primary. This call will also return specific status if it is        ever selected as the new primary node.    -   takeover_communicator: available only to backup control nodes.        This will cause the backup control node to assume the role of        the primary control node in a communicator.    -   send: sends a block of data to a single specified peer node    -   recv: receives a block of data from a single specified peer node    -   find_data: finds a peer node from which data is available to        receive. Optionally waits for data to become available.    -   broadcast: distributes a block of data from a single node, to        every other node in the grid. Broadcast operations can be either        simple or tree based. For small blocks of data, the control node        sends the entire block of data to each worker node. For larger        blocks of data, the nodes are organized in a tree, where each        node relays data to at most two other nodes. The tree may        generated using the algorithm in FIG. 21. The broadcast may        performed using the algorithm or process described in FIG. 22.    -   reduce: accepts a vector of typed data on every node in the        grid. A specific operation is performed on each element of the        array from every node. The resulting array of data is sent to a        single node. The tree may generated using the algorithm in        FIG. 21. The broadcast may performed using the algorithm or        process described in FIG. 23.    -   reduce_all: same operation as reduce, except that the resulting        array is available on every node in the grid.    -   barrier: blocks until every node in the grid calls barrier.    -   list_broken_nodes: finds a list of nodes in the communicator        that have failed    -   on_failure: installs a callback function that will be called        every time a communications API fails. This can simplify error        handling by having a single function that processes all        failures.    -   on_node_failure: installs a callback function that will be        called when any peer node in the grid has failed. This can allow        a centralized location for processing the loss of a peer node in        a timely manner, even when a communications API has not failed.    -   root_rank: finds the rank of the current primary control node    -   num_ranks: find the number of nodes participating in the        communicator—(not including the backup control nodes)    -   close: discontinues participation in the communicator. Any other        nodes will see this node as broken.    -   break_communicator: causes every node in the grid to encounter        communications failures. This can be used to force the error        recovery path in every node.    -   duplicate_communicator: creates a new communicator based upon an        existing communicator. The nodes in the new communicator may        include every node in the current communicator, or a subset of        those nodes.

In some examples described herein, the systems and methods may includedata transmissions conveyed via networks (e.g., local area network, widearea network, Internet, or combinations thereof, etc.), fiber opticmedium, carrier waves, wireless networks, etc. for communication withone or more data processing devices. The data transmissions can carryany or all of the data disclosed herein that is provided to or from adevice.

Some aspects may utilize the Internet of Things (IoT), where things(e.g., machines, devices, phones, sensors) can be connected to networksand the data from these things can be collected and processed within thethings and/or external to the things. For example, with the IoT therecan be sensors in many different devices, and high value analytics canbe applied to identify hidden relationships and drive increasedefficiencies. This can apply to both Big Data analytics and realtime(streaming) analytics.

Additionally, the methods and systems described herein may beimplemented on many different types of processing devices by programcode comprising program instructions that are executable by the deviceprocessing subsystem. The software program instructions may includesource code, object code, machine code, or any other stored data that isoperable to cause a processing system to perform the methods andoperations described herein. Other implementations may also be used,however, such as firmware or even appropriately designed hardwareconfigured to carry out the methods and systems described herein.

The systems' and methods' data (e.g., associations, mappings, datainput, data output, intermediate data results, final data results, etc.)may be stored and implemented in one or more different types ofcomputer-implemented data stores, such as different types of storagedevices and programming constructs (e.g., RAM, ROM, Flash memory,removable memory, flat files, temporary memory, databases, programmingdata structures, programming variables, IF-THEN (or similar type)statement constructs, etc.). It is noted that data structures maydescribe formats for use in organizing and storing data in databases,programs, memory, or other computer-readable media for use by a computerprogram.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, and it can bedeployed in any form, including as a stand-alone program or as a module,component, subroutine, or other unit suitable for use in a computingenvironment. A computer program does not necessarily correspond to afile in a file system. A program can be stored in a portion of a filethat holds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub programs, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network. The processes and logic flowsand figures described and shown in this specification can be performedby one or more programmable processors executing one or more computerprograms to perform functions by operating on input data and generatingoutput.

Generally, a computer can also include, or be operatively coupled toreceive data from or transfer data to, or both, one or more mass storagedevices for storing data, e.g., magnetic, magneto optical disks, oroptical disks. However, a computer need not have such devices. Moreover,a computer can be embedded in another device, e.g., a mobile telephone,a personal digital assistant (PDA), a tablet, a mobile viewing device, amobile audio player, a Global Positioning System (GPS) receiver, to namejust a few. Computer readable media suitable for storing computerprogram instructions and data include all forms of nonvolatile memory,media and memory devices, including by way of semiconductor memorydevices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks,e.g., internal hard disks or removable disks; magneto optical disks; andCD ROM and DVD-ROM disks. The processor and the memory can besupplemented by, or incorporated in, special purpose logic circuitry.

The computer components, software modules, functions, data stores anddata structures described herein may be connected directly or indirectlyto each other in order to allow the flow of data needed for theiroperations. It is also noted that a module or processor includes but isnot limited to a unit of code that performs a software operation, andcan be implemented for example as a subroutine unit of code, or as asoftware function unit of code, or as an object (as in anobject-oriented paradigm), or as an applet, or in a computer scriptlanguage, or as another type of computer code. The software componentsor functionality may be located on a single computer or distributedacross multiple computers depending upon the situation at hand.

The computer may include a programmable machine that performs high-speedprocessing of numbers, as well as of text, graphics, symbols, and sound.The computer can process, generate, or transform data. The computerincludes a central processing unit that interprets and executesinstructions; input devices, such as a keyboard, keypad, or a mouse,through which data and commands enter the computer; memory that enablesthe computer to store programs and data; and output devices, such asprinters and display screens, that show the results after the computerhas processed, generated, or transformed data.

Implementations of the subject matter and the functional operationsdescribed in this specification can be implemented in digital electroniccircuitry, or in computer software, firmware, or hardware, including thestructures disclosed in this specification and their structuralequivalents, or in combinations of one or more of them. Implementationsof the subject matter described in this specification can be implementedas one or more computer program products, i.e., one or more modules ofcomputer program instructions encoded on a computer readable medium forexecution by, or to control the operation of, data processing apparatus.The computer readable medium can be a machine-readable storage device, amachine-readable storage substrate, a memory device, a composition ofmatter effecting a machine-readable propagated, processed communication,or a combination of one or more of them. The term “data processingapparatus” encompasses all apparatus, devices, and machines forprocessing data, including by way of example a programmable processor, acomputer, or multiple processors or computers. The apparatus caninclude, in addition to hardware, code that creates an executionenvironment for the computer program in question, e.g., code thatconstitutes processor firmware, a protocol stack, a graphical system, adatabase management system, an operating system, or a combination of oneor more of them.

The methods, systems, devices, implementations, and embodimentsdiscussed above are examples. Various configurations may omit,substitute, or add various procedures or components as appropriate. Forinstance, in alternative configurations, the methods may be performed inan order different from that described, or various stages may be added,omitted, or combined. Also, features described with respect to certainconfigurations may be combined in various other configurations.Different aspects and elements of the configurations may be combined ina similar manner. Also, technology evolves and, thus, many of theelements are examples and do not limit the scope of the disclosure orclaims.

Some systems may use Hadoop®, an open-source framework for storing andanalyzing big data in a distributed computing environment. Some systemsmay use cloud computing, which can enable ubiquitous, convenient,on-demand network access to a shared pool of configurable computingresources (e.g., networks, servers, storage, applications and services)that can be rapidly provisioned and released with minimal managementeffort or service provider interaction. Some grid systems may beimplemented as a multi-node Hadoop® cluster, as understood by a personof skill in the art. Apache™ Hadoop® is an open-source softwareframework for distributed computing. Some systems may use the SAS® LASR™Analytic Server in order to deliver statistical modeling and machinelearning capabilities in a highly interactive programming environment,which may enable multiple users to concurrently manage data, transformvariables, perform exploratory analysis, build and compare models andscore. Some systems may use SAS In-Memory Statistics for Hadoop® to readbig data once and analyze it several times by persisting it in-memoryfor the entire session. Some systems may use a combination of severalother types of systems or servers, including those systems and serversmentioned herein.

Specific details are given in the description to provide a thoroughunderstanding of examples of configurations (including implementations).However, configurations may be practiced without these specific details.For example, well-known circuits, processes, algorithms, structures, andtechniques have been shown without unnecessary detail in order to avoidobscuring the configurations. This description provides examples ofconfigurations only, and does not limit the scope, applicability, orconfigurations of the claims. Rather, the preceding description of theconfigurations will provide those skilled in the art with an enablingdescription for implementing described techniques. Various changes maybe made in the function and arrangement of elements without departingfrom the spirit or scope of the disclosure.

Also, configurations may be described as a process that is depicted as aflow diagram or block diagram. Although each may describe the operationsas a sequential process, many of the operations can be performed inparallel or concurrently. In addition, the order of the operations maybe rearranged. A process may have additional steps not included in thefigure. Furthermore, examples of the methods may be implemented byhardware, software, firmware, middleware, microcode, hardwaredescription languages, or any combination thereof. When implemented insoftware, firmware, middleware, or microcode, the program code or codesegments to perform the necessary tasks may be stored in anon-transitory computer-readable medium such as a storage medium.Processors may perform the described tasks.

Having described several examples of configurations, variousmodifications, alternative constructions, and equivalents may be usedwithout departing from the spirit of the disclosure. For example, theabove elements may be components of a larger system, wherein other rulesmay take precedence over or otherwise modify the application of thecurrent disclosure. Also, a number of operations may be undertakenbefore, during, or after the above elements are considered. Accordingly,the above description does not bound the scope of the claims.

The use of “capable of”, “adapted to”, or “configured to” herein ismeant as open and inclusive language that does not foreclose devicesadapted to or configured to perform additional tasks or operations.Additionally, the use of “based on” is meant to be open and inclusive,in that a process, step, calculation, or other action “based on” one ormore recited conditions or values may, in practice, be based onadditional conditions or values beyond those recited. Headings, lists,and numbering included herein are for ease of explanation only and arenot meant to be limiting.

It should be understood that as used in the description herein andthroughout the claims that follow, the meaning of “a,” “an,” and “the”includes plural reference unless the context clearly dictates otherwise.Also, as used in the description herein and throughout the claims thatfollow, the meaning of “in” includes “in” and “on” unless the contextclearly dictates otherwise. Finally, as used in the description hereinand throughout the claims that follow, the meanings of “and” and “or”include both the conjunctive and disjunctive and may be usedinterchangeably unless the context expressly dictates otherwise; thephrase “exclusive or” may be used to indicate situation where only thedisjunctive meaning may apply.

While the present subject matter has been described in detail withrespect to specific embodiments thereof, it will be appreciated thatthose skilled in the art, upon attaining an understanding of theforegoing may readily produce alterations to, variations of, andequivalents to such embodiments. Accordingly, it should be understoodthat the present disclosure has been presented for purposes of examplerather than limitation, and does not preclude inclusion of suchmodifications, variations or additions to the present subject matter asmay be readily apparent to one of ordinary skill in the art.

While this disclosure may contain many specifics, these should not beconstrued as limitations on the scope or of what may be claimed, butrather as descriptions of features specific to particularimplementations. Certain features that are described in thisspecification in the context of separate implementations can also beimplemented in combination in a single implementation. Conversely,various features that are described in the context of a singleimplementation can also be implemented in multiple implementationsseparately or in any suitable subcombination. Moreover, althoughfeatures may be described above as acting in certain combinations andeven initially claimed as such, one or more features from a claimedcombination can in some cases be excised from the combination, and theclaimed combination may be directed to a subcombination or variation ofa subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the implementations described above should not beunderstood as requiring such separation in all implementations, and itshould be understood that the described program components and systemscan generally be integrated together in a single software or hardwareproduct or packaged into multiple software or hardware products.

What is claimed is:
 1. A computer-program product tangibly embodied in anon-transitory machine-readable storage medium, including instructionsconfigured to cause a data processing apparatus to: receive, at a backupcontrol node connected to a primary control node and a worker node on acommunications grid, grid status information, the grid statusinformation including a project status of the primary control node or aproject status of the worker node, wherein the project status of theprimary control node and the project status of the worker node include astatus of one or more portions of a project being executed by theprimary and worker nodes in the communications grid; store the gridstatus information within the backup control node; receive a failurecommunication including an indication that the primary control node hasfailed; designate the backup control node as a new primary control nodebased on the failure communication upon receiving the failurecommunication; receive, at the backup control node, updated grid statusinformation based on the indication that the primary control node hasfailed, wherein the updated grid status information includes an updatedproject status of the primary control node or an updated project statusof the worker node; and transmit, by the backup control node, a set ofinstructions based on the updated grid status information, wherein theset of instructions includes instructions for the worker nodes tocontinue work on the project after failure of the primary control node.2. The computer-program product of claim 1, further comprisinginstructions configured to cause the data processing apparatus to:receive, at the backup control node, a primary node communicationincluding an indication that the backup control node is the new primarycontrol node.
 3. The computer-program product of claim 1, wherein uponreceiving the failure communication, the backup control node determineswhether the backup node should be designated as the new primary controlnode based on a unique identifier or rank of the backup control node,and assigning a new primary control node.
 4. The computer-programproduct of claim 1, wherein upon receiving the failure communication,the backup control node determines that the backup control node is theonly backup control node on the communications grid.
 5. Thecomputer-program product of claim 1, wherein the primary control nodecontrols the portions of the project that each worker node isresponsible for executing.
 6. The computer-program product of claim 1,wherein each control node and worker node on the communications grid isassigned a unique identifier stored, wherein the unique identifiers ofthe nodes indicate a hierarchy of the nodes within the communicationsgrid, and wherein each control node and each worker node store theunique identifier for every other control node and worker node on thecommunications grid.
 7. The computer-program product of claim 1, whereinworker nodes of the worker node executes different portions of theproject.
 8. The computer-program product of claim 1, wherein the gridstatus information includes a project checkpoint that indicates a stageof progress of the project prior to failure of the primary control node.9. The computer-program product of claim 8, wherein transmitting the setof instructions based on the updated grid status information includestransmitting a status from the project checkpoint that indicates thestage of progress of the project prior to the failure of the primarycontrol node.
 10. The computer-program product of claim 1, furthercomprising instructions configured to cause the data processingapparatus to: determine that the primary control node has failed,wherein determining that the primary control node has failed includesdetermining that the backup control node did not receive an expectedheartbeat communication, wherein the heartbeat communication indicatesthat the primary control node is operative.
 11. The computer-programproduct of claim 10, wherein determining that the primary control nodehas failed includes determining that the backup control node did notreceive a heartbeat communication from the primary control node after apredetermined period of time.
 12. A computing device, comprising: one ormore processors; and a memory having instructions stored thereon, whichwhen executed by the one or more processors, cause the computing deviceto perform operations including: receiving, at a backup control nodeconnected to a primary control node and a worker node on acommunications grid, grid status information, the grid statusinformation including a project status of the primary control node or aproject status of the worker node, wherein the project status of theprimary control node and the project status of the worker node include astatus of one or more portions of a project being executed by theprimary and worker nodes in the communications grid; storing the gridstatus information within the backup control node; receiving a failurecommunication including an indication that the primary control node hasfailed; designating the backup control node as a new primary controlnode based on the failure communication upon receiving the failurecommunication; receiving, at the backup control node, updated gridstatus information based on the indication that the primary control nodehas failed, wherein the updated grid status information includes anupdated project status of the primary control node or an updated projectstatus of the worker node; and transmitting, by the backup control node,a set of instructions based on the updated grid status information,wherein the set of instructions includes instructions for the workernodes to continue work on the project after failure of the primarycontrol node.
 13. The computing device of claim 12, further comprisinginstructions, which when executed by the one or more processors, causethe computing device to perform operations including: receiving, at thebackup control node, a primary node communication including anindication that the backup control node is the new primary control node.14. The computing device of claim 12, wherein upon receiving the failurecommunication, the backup control node determines whether the backupnode should be designated as the new primary control node based on aunique identifier or rank of the backup control node, and assigning anew primary control node.
 15. The computing device of claim 12, whereinupon receiving the failure communication, the backup control nodedetermines that the backup control node is the only backup control nodeon the communications grid.
 16. The computing device of claim 12,wherein the primary control node controls the portions of the projectthat each worker node is responsible for executing.
 17. The computingdevice of claim 12, wherein each control node and worker node on thecommunications grid is assigned a unique identifier stored, wherein theunique identifiers of the nodes indicate a hierarchy of the nodes withinthe communications grid, and wherein each control node and each workernode store the unique identifier for every other control node and workernode on the communications grid.
 18. The computing device of claim 12,wherein worker nodes of the worker node executes different portions ofthe project.
 19. The computing device of claim 12, wherein the gridstatus information includes a project checkpoint that indicates a stageof progress of the project prior to failure of the primary control node.20. The computing device of claim 19, wherein transmitting the set ofinstructions based on the updated grid status information includestransmitting a status from the project checkpoint that indicates thestage of progress of the project prior to the failure of the primarycontrol node.
 21. The computing device of claim 12, further comprisinginstructions, which when executed by the one or more processors, causethe computing device to perform operations including: determining thatthe primary control node has failed, wherein determining that theprimary control node has failed includes determining that the backupcontrol node did not receive an expected heartbeat communication,wherein the heartbeat communication indicates that the primary controlnode is operative.
 22. The computing device of claim 21, whereindetermining that the primary control node has failed includesdetermining that the backup control node did not receive a heartbeatcommunication from the primary control node after a predetermined periodof time.
 23. A computer-implemented method, comprising: receiving, at abackup control node connected to a primary control node and a workernode on a communications grid, grid status information, the grid statusinformation including a project status of the primary control node or aproject status of the worker node, wherein the project status of theprimary control node and the project status of the worker node include astatus of one or more portions of a project being executed by theprimary and worker nodes in the communications grid; storing the gridstatus information within the backup control node; receiving a failurecommunication including an indication that the primary control node hasfailed; designating the backup control node as a new primary controlnode based on the failure communication upon receiving the failurecommunication; receiving, at the backup control node, updated gridstatus information based on the indication that the primary control nodehas failed, wherein the updated grid status information includes anupdated project status of the primary control node or an updated projectstatus of the worker node; and transmitting, by the backup control node,a set of instructions based on the updated grid status information,wherein the set of instructions includes instructions for the workernodes to continue work on the project after failure of the primarycontrol node.
 24. The method of claim 23, further comprising: receiving,at the backup control node, a primary node communication including anindication that the backup control node is the new primary control node.25. The method of claim 23, wherein upon receiving the failurecommunication, the backup control node determines whether the backupnode should be designated as the new primary control node based on aunique identifier or rank of the backup control node, and assigning anew primary control node.
 26. The method of claim 23, wherein uponreceiving the failure communication, the backup control node determinesthat the backup control node is the only backup control node on thecommunications grid.
 27. The method of claim 23, wherein the primarycontrol node controls the portions of the project that each worker nodeis responsible for executing.
 28. The method of claim 23, wherein eachcontrol node and worker node on the communications grid is assigned aunique identifier stored, wherein the unique identifiers of the nodesindicate a hierarchy of the nodes within the communications grid, andwherein each control node and each worker node store the uniqueidentifier for every other control node and worker node on thecommunications grid.
 29. The method of claim 23, wherein worker nodes ofthe worker node executes different portions of the project.
 30. Themethod of claim 23, wherein the grid status information includes aproject checkpoint that indicates a stage of progress of the projectprior to failure of the primary control node.
 31. The method of claim30, wherein transmitting the set of instructions based on the updatedgrid status information includes transmitting a status from the projectcheckpoint that indicates the stage of progress of the project prior tothe failure of the primary control node.
 32. The method of claim 22,further comprising: determining that the primary control node hasfailed, wherein determining that the primary control node has failedincludes determining that the backup control node did not receive anexpected heartbeat communication, wherein the heartbeat communicationindicates that the primary control node is operative.
 33. The method ofclaim 32, wherein determining that the primary control node has failedincludes determining that the backup control node did not receive aheartbeat communication from the primary control node after apredetermined period of time.